import Vue from 'vue';
import VueRouter from 'vue-router';
// 使用
Vue.use(VueRouter);
// 引入组件
import HomePage from '@/views/HomePage'
import CategoryPage from '@/views/CategoryPage'

// 创建路由规则
var routes = [{
    path: '/',
    component: HomePage
}, {
    path: '/categorypage',
    component: CategoryPage
}];
// 创建router
var router = new VueRouter({
    routes
});

export default router;